//
//  BGDDBasicController.m
//  bigMall
//
//  Created by ios on 16/8/3.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGDDBasicController.h"
#import "BGJinDuViewController.h"

@interface BGDDBasicController ()

@end

@implementation BGDDBasicController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title = @"订单详情";
    
    UIBarButtonItem *right = [[UIBarButtonItem alloc] initWithTitle:@"进度" style:UIBarButtonItemStylePlain target:self action:@selector(jindu)];
    self.navigationItem.rightBarButtonItem = right;
    
    UIBarButtonItem *back = [[UIBarButtonItem alloc] init];
    back.title = @"";
    self.navigationItem.backBarButtonItem = back;
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    //创建的按钮
    [self createBtn];
    
}

- (void)createBtn {
    
    int index = 2;//列
    CGFloat width = (BGWidth - (index + 1) * 25) / index ;
    
    for (int i = 1; i <= index; i++) {
        
        UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(i * 25 + (i - 1) * width, [UIScreen mainScreen].bounds.size.height - 60, width, 50)];
        
        btn.clipsToBounds = YES;
        
        btn.layer.cornerRadius = 10;
        
        btn.backgroundColor = [UIColor redColor];
        
        [self.view addSubview:btn];
        
    }
    
}

- (void)jindu {
    
    BGJinDuViewController *a = [[BGJinDuViewController alloc] init];
    self.hidesBottomBarWhenPushed = YES;

    [self.navigationController pushViewController:a animated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
